<?php
	//convert date from RFC3389 to date yyyy-mm-dd
	function convertDate($RFC) {
		$date = new DateTime($RFC);
		$dateStr = $date->format('Y-m-d');
		return $dateStr;
	}
	//convert RFC3389 to time H:i:s
	function convertTime($RFC) {
		$date = new DateTime($RFC);
		$dateStr = $date->format('H:i:s');
		return $dateStr;
	}
	
	//convert from standard Y-m-d H:i:s to RFC3389
	function convertDateTime($RFC) {
		$date = new DateTime($RFC);
		$dateStr = $date->format('Y-m-d\TH:i:s\Z');
		return $dateStr;
	}		
	
?>